package com.xy.biz.ts.domain.converter;

import java.util.Collection;
import java.util.List;

import com.xy.biz.ts.domain.bo.ExaminationPaperQuestionBO;
import com.xy.biz.ts.domain.req.SaveExaminationPaperQuestionRequest;
import com.xy.tool.util.BeanUtilsEx;
import com.xy.biz.ts.domain.po.ExaminationPaperQuestionPO;

/**
 *
 *
 * @author wcs
 * @date 2021-3-8
 */
public class ExaminationPaperQuestionConverter {

	public static ExaminationPaperQuestionPO toPO(ExaminationPaperQuestionBO source) {
		return BeanUtilsEx.copyProperties(source, () -> new ExaminationPaperQuestionPO(), true);
	}

	public static List<ExaminationPaperQuestionPO> toPO(Collection<ExaminationPaperQuestionBO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new ExaminationPaperQuestionPO(), true);
	}

	public static ExaminationPaperQuestionBO fromPO(ExaminationPaperQuestionPO source) {
		return BeanUtilsEx.copyProperties(source, () -> new ExaminationPaperQuestionBO());
	}

	public static List<ExaminationPaperQuestionBO> fromPO(Collection<ExaminationPaperQuestionPO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new ExaminationPaperQuestionBO());
	}

	public static ExaminationPaperQuestionBO toBO(SaveExaminationPaperQuestionRequest source) {
		return BeanUtilsEx.copyProperties(source, () -> new ExaminationPaperQuestionBO(), true);
	}

	public static List<ExaminationPaperQuestionBO> toBO(Collection<SaveExaminationPaperQuestionRequest> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new ExaminationPaperQuestionBO(), true);
	}



}
